A5Storage::DataContainer GetItem Method

Syntax

.GetItem as L (BYREF Data as C, BYREF ContentType as C, TargetPath as C)

.GetItem as L (BYREF Data as B, BYREF ContentType as C, TargetPath as C)

Arguments

BYREF DataCharacter Binary

The data variable where content is set.

BYREF ContentTypeCharacter

The content type for the data.

TargetPathCharacter

The item to retrieve.

Returns

ResultLogical

Returns .T. if the operation succeeds, otherwise .F. (see .CallResult for additional error information.)

Description

Retrieves an item from the container using the provided name. The content type is also returned.

Discussion

You must DIM the resulting Data variable and contentType variable before making the call.

Example

dim ResultData as B
dim ContentType	as C
dim Container as A5Storage::DataContainer = null_value()

CallResult = A5Storage::DataContainer::Open(Container, "Provider='Disk';Container='c:\A5Webroot';")

? CallResult.Success
= .T.

? Container.GetItem(ResultData, ContentType, "MyFile.jpg")
= .T.